import request from '@/utils/request'

/**
 * 获取分页信息
 * @param {*} params 
 * @returns 
 */
export function fetchList(params) {
    return request({
        url: '/blog/posts/page',
        method: 'post',
        params,
    
    })
}

/**
 * 获取聚焦推荐博客
 * @returns 
 */
export function fetchFocus() {
    return request({
        url: '/blog/focus/list',
        method: 'get',
    })
}

export function fetchCategory() {
    return request({
        url:'/blog/category/header',
        method:'get'
    })
}

export function fetchFriend() {
    return request({
        url: '/friend',
        method: 'get',
        params: {}
    })
}

/**
 * 获取社交信息
 * @returns 
 */
export function fetchSocial() {
    return request({
        url: '/blog/app/social',
        method: 'get',
    });
}

/**
 * 博主的基本信息展示
 * @param {*} params 
 * @returns 
 */
export function fetchSiteInfo(params) {
    return request({
        url: '/blog/app/site',
        method: 'get',
        params
    })
}

export function fetchComment() {
    return request({
        url: '/comment',
        method: 'get',
        params: {}
    })
}


export function fetchApp(){
    return request({
        url:'/blog/app',
        method:'get'
    })
}
